3D Graphics Programming with QuickDraw 3D 1.5.4
Previous | QD3D Book | Overview | Chapter Contents | Next |
QuickDraw 3D currently supplies three types of renderers, a wireframe renderer, an interactive renderer, and a generic renderer. Only the wireframe and interactive renderers can actually draw images; the generic renderer is available for you to collect a view's state without actually rendering an image.
The wireframe renderer creates line drawings of models; it operates extremely quickly and with comparatively little memory. Figure 1 shows an example of a model drawn by QuickDraw 3D's wireframe renderer (see also Color Plate 1 at the beginning of this book).
Because a wireframe image is simply a line drawing, there is no way to illuminate or shade surfaces. The wireframe renderer ignores the group of lights associated with a view and invokes none of the standard shaders supplied by QuickDraw 3D. Note, however, that the wireframe renderer does invoke any custom shaders you have associated with a view.
Figure 1 An image drawn by the wireframe renderer
The interactive renderer uses a fast and accurate depth-sorting algorithm for drawing solid, shaded surfaces as well as vectors. It is usually slower and requires more memory than the wireframe renderer. When the size of a model is reasonable and only very simple shadings are required, however, the interactive renderer is usually fast enough to provide acceptable interactive performance. The interactive renderer is also capable of rendering highly detailed, complex models with very realistic surface illumination and shading, but at the expense of time and memory. On machines with small amounts of memory, the interactive renderer may need to traverse a model in multiple passes to render the image completely. Figure 2 shows an image created by QuickDraw 3D's interactive renderer.
Figure 2 An image drawn by the interactive renderer
The interactive renderer is capable of driving either a software-only rasterizer or a hardware accelerator. In general, the interactive renderer uses a hardware accelerator if one is available, to provide maximum performance. You can, however, set the renderer preferences to indicate whether the interactive renderer should operate in software only or whether it should take advantage of a hardware accelerator. (See the "Using Renderer Objects" for details on setting a renderer's preferences.)
The interactive renderer supports all three available illumination shaders (Phong, Lambert, and null). Some rendering capabilities, however, are available only when the interactive renderer is using the hardware accelerator supplied by Apple Computer, Inc., including transparency, shadows, and constructive solid geometry (CSG).
Previous | QD3D Book | Overview | Chapter Contents | Next |